<!doctype html>
<html class="no-js" lang="zxx" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">

    <title>考勤</title>

    <link rel="stylesheet" href="../../../static/css/vendor/bootstrap.min.css">
    <link rel="stylesheet" href="../../../static/css/vendor/font-awesome.css">
    <link rel="stylesheet" href="../../../static/css/vendor/ion-fonts.css">
    <link rel="stylesheet" href="../../../static/css/style.css">
    <link rel="stylesheet" href="../../../static/css/plugins/animate.css">
    <link rel="stylesheet" href="../../../static/test/attencev3/attencev3.css">
    <link rel="stylesheet" href="../../../static/css/common.css">
    <link rel="stylesheet" href="../../../static/test/ziy/previewfile.css">
    <link rel="stylesheet" href="../../../static/test/ziy/iconfont.css">
    <link rel="stylesheet" href="../../../static/test/ziy/layer.css">
</head>

<body class="template-color-1">


<div class="main-wrapper">

    <!-- Begin Loading Area -->

    <!-- Loading Area End Here -->

    <!-- Begin Umino's Header Main Area -->
    <header class="header-main_area">
        <div class="header-middle_area">
            <div class="container">
                <div class="row">
                    <div class="col-lg-5 col-sm-5">
                        <div class="header-logo">
                            <a href="index/index.html">
                                <img src="../../../static/images/menu/logo/1.png" alt="Umino's Header Logo">
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-5 col-sm-5 d-none d-lg-block">
                        <div class="contact-info">
                            <div class="contact-info_icon">
                                <i class="ion-android-clipboard"></i>
                            </div>
                            <div class="contact-info_content" th:if="${course != null}">
                                <span th:text="${course.name}">数据结构</span>
                                <a href="/member/list" th:text="${course.teacherName}" style="cursor:pointer">老师：xxx</a>
                            </div>
                            <div class="contact-info_content" th:if="${course == null}">
                                <span>错误！！！</span>
                                <span>暂无此课程</span>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-2 col-sm-2 d-none d-lg-block">
                        <div class="hm-minicart_area">
                            <ul>
                                <!--消息-->
                                <li>
                                    <a href="cart.html">
                                        <div class="minicart-icon">
                                            <i class="icon ion-android-textsms"></i>
                                            <span class="item-count">2</span>
                                        </div>
                                        <div class="minicart-title">
                                            <span class="item_total"></span>
                                        </div>
                                    </a>
                                    <ul class="minicart-body">

                                        <li>
                                            <div class="price_content">
                                                <div class="cart-subtotals">
                                                    <div class="products subtotal-list">
                                                        <span class="label">【发布了公告】 测试公告2 </span>
                                                        <span class="value">2019/09/06</span>
                                                    </div>
                                                    <div class="shipping subtotal-list">
                                                        <span class="label">【发布了公告】 测试公告</span>
                                                        <span class="value">2019/09/06</span>
                                                    </div>
                                                </div>
                                                <div class="minicart-button">
                                                    <a class="umino-btn umino-btn_fullwidth" href="#">查看全部</a>
                                                </div>
                                            </div>
                                        </li>
                                    </ul>
                                </li>
                                <!--个人中心-->
                                <li>
                                    <a href="javascrpt:;">
                                        <div class="minicart-icon wishlist-icon">
                                            <i class="icon ion-android-settings"></i>
                                        </div>
                                    </a>
                                    <div class="userinfo hide" style="display: none;">
                                        <ul>
                                            <li>
                                                <a class="link setting" href="/user/personal"><i class="icon ion-android-person"></i>  个人设置</a>
                                            </li>
                                            <li>
                                                <a class="link logout" href="/doLogout"><i class="ion-log-out"></i> 退出账户</a>
                                            </li>
                                        </ul>
                                    </div>

                                </li>
                            </ul>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <div class="header-bottom_area @@bgColor">
            <div class="container">
                <div class="row">
                    <div class="col-lg-5">
                        <div class="category-menu category-menu-hidden">
                            <div class="category-heading">
                                <h2 class="categories-toggle"><span>菜单</span></h2>
                            </div>
                            <div id="cate-toggle" class="category-menu-list">
                                <ul>
                                    <li><a href="">课堂</a></li>
                                    <li><a href="">备课区</a></li>
                                    <li class="right-menu"><a href="">教授的课程</a>
                                        <ul class="cat-dropdown_menu">
                                            <li>
                                                <a href="">数据结构</a>
                                                <a href="">计算机网络</a>
                                                <a href="">通信原理</a>
                                                <a href="">高等数学</a>
                                                <a href="">线性代数</a>

                                            </li>
                                        </ul>
                                    </li>

                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6 d-none d-lg-block position-../../../static">
                        <div class="main-menu_area">
                            <nav class="main_nav">
                                <ul>
                                    <li><a href="/course/index.html">首页</a></li>
                                    <li><a th:href="@{'/matter/Amatter/'+${course.id}}">互动</a></li>
                                    <li><a href="../homework.html">作业</a></li>
                                    <li><a href="../courseware.html">资料</a></li>
                                    <li><a href="../testpaper.html">测试</a></li>
                                    <shiro:hasRole name="teacher">
                                        <li  class="active"><a href="/attendance/selectAll">考勤</a></li>
                                    </shiro:hasRole>
                                    <shiro:hasRole name="student">
                                        <li  class="active"><a href="/attendance/selectCourseAndTea">考勤</a></li>
                                    </shiro:hasRole>
                                </ul>
                            </nav>
                        </div>
                    </div>

                </div>
            </div>
        </div>


    </header>
</div>
<div class="breadcrumb-area"></div>
<!-------------------------------------------考勤内容------------------------------------------------------------->

<div class="perform-page">
    <div>
        <div class="attend normal" style="box-shadow:none">
            <div class="attend_header">
                <div class="attend_headleft">
                    <div class="attend_headleft_div name">
                        <h2 style="font-weight: bold;">考勤</h2>
                        <p class="text-overflow">课程名称</p>
                    </div>
                    <div class="attend_headleft_div">
                        <h2 style="font-weight: bold;">20</h2>
                        <p>班级人数</p>
                    </div>
                    <div class="attend_headleft_div">
                        <h2 style="font-weight: bold;"><span class="attend_ratenum">45</span><b>%</b></h2>
                        <p>平均出勤率</p>
                    </div>

                </div>
                <div class="attend_headright">
                    <a href="javascript:;" class="btn-createattend">新建考勤</a>
                </div>

                <div style="clear: both;"></div>
            </div>
            <div class="attend_main">
                <div class="attend_mainleft">
                    <div class="attend_mlhead">
                        <span>考勤历史</span><span style="margin:0 10px;font-size: 12px;" id="attence_count">(2次)</span>
                        <div class="dlchartbox">
                            <a href="javascript:;" class="btn-download" id="downloadAttenceReport">
                                <i class="iconfont iconxiazaibaobiao"></i>下载报表
                            </a>
                            <ul class="dlul">
                                <li class="dlli">
                                    <a href="javascript:;" class="dlall">下载全部</a>
                                </li>
                                <li class="dlli">
                                    <a href="javascript:;" class="dlbytime">按时间下载</a>
                                </li>
                            </ul>
                        </div>
                        <a href="" class="btn-data">
                            <i class="iconfont iconshujutongji1"></i>数据统计
                        </a>
                    </div>
                    <div class="attend_attendlists">

                        <div class="attend_attendlist" data-id="MDAwMDAwMDAwMLOGpZiGqa9thqVyoQ" style="position: relative;">
                            <div class="attend_alright">
                                <span>出勤率</span>
                                <div class="attend_circle"  id="test11"  style="-webkit-tap-highlight-color: transparent; user-select: none; background: transparent;">
                                    <div style="position: relative; overflow: hidden; width: 60px; height: 60px; padding: 0px; margin: 0px; border-width: 0px; cursor: default;">
                                    <canvas width="90" height="90" data-zr-dom-id="zr_0" style="position: absolute; left: 0px; top: 0px; width: 60px; height: 60px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); padding: 0px; margin: 0px; border-width: 0px;"></canvas>
                                    </div>
                                </div>
                                <a href="javascript:;" class="attend_alrmore"></a>
                                <ul style="display: none;">
                                    <li class="btn_delete_attend">删除</li>
                                    <li class="btn_altertitle_attend">重命名</li>
                                </ul>
                            </div>
                            <a href="attencedetail.html">
                            <p class="attend_alname textoverflow">
                                第二次考勤
                            </p>
                            </a>
                            <p class="attend_aldis">
                                <span class="attend_aldate">2019.10.05</span>
                                <span class="attend_altime">22:42</span>
                                <span class="attend_altype">数字考勤</span>
                            </p>
                        </div>

                        <div class="attend_attendlist" data-id="MDAwMDAwMDAwMLWGy9uHqc1p" style="position: relative;">
                            <div class="attend_alright">
                                <span>出勤率</span>
                                <div class="attend_circle"  style="-webkit-tap-highlight-color: transparent; user-select: none; background: transparent;">
                                    <div style="position: relative; overflow: hidden; width: 60px; height: 60px; padding: 0px; margin: 0px; border-width: 0px;">
                                        <canvas width="90" height="90" data-zr-dom-id="zr_0" style="position: absolute; left: 0px; top: 0px; width: 60px; height: 60px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); padding: 0px; margin: 0px; border-width: 0px;"></canvas>
                                    </div>
                                </div>
                                <a href="javascript:;" class="attend_alrmore"></a>
                                <ul style="display: none;">
                                    <li class="btn_delete_attend">删除</li>
                                    <li class="btn_altertitle_attend">重命名</li>
                                </ul>
                            </div>
                            <p class="attend_alname textoverflow">
                                第一次考勤
                            </p>
                            <p class="attend_aldis">
                                <span class="attend_aldate">2019.06.27</span>
                                <span class="attend_altime">10:23</span>
                                <span class="attend_altype">传统考勤</span>
                            </p>
                        </div>

                    </div>
                </div>
                <div class="attend_mainright">
                    <p class="attend_mrhead">
                        <span>旷课次数最高(10)</span>
                    </p>
                    <div class="overflow" style="height: 420px;">
                        <div class="attend_studentlists" style="height: 420px;">

                            <div class="attend_studentlist" data-id="MDAwMDAwMDAwMLR2x6E">
                                <img src="./3.jpg" class="attend_stuimg">
                                <span class="attend_stuname textoverflow">开普勒</span>
                                <span class="attend_stuatt">2<span style="font-size: 12px;">次 </span>   </span>
                            </div>
                            <div class="attend_studentlist" data-id="MDAwMDAwMDAwMLR2x6E">
                                <img src="./3.jpg" class="attend_stuimg">
                                <span class="attend_stuname textoverflow">开普勒</span>
                                <span class="attend_stuatt">2<span style="font-size: 12px;">次 </span>   </span>
                            </div>
                            <div class="attend_studentlist" data-id="MDAwMDAwMDAwMLR2x6E">
                                <img src="./3.jpg" class="attend_stuimg">
                                <span class="attend_stuname textoverflow">开普勒</span>
                                <span class="attend_stuatt">2<span style="font-size: 12px;">次 </span>   </span>
                            </div>



                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<!--新建弹窗-->
<div class="del-pop" id="new-perform" data-type="3">
    <div class="pop-title">
        <h3>新建考勤</h3>
        <a href="javascript:;" class="close"></a>
    </div>
    <div class="content">
        <div class="input-box">
            <span>考勤名称：</span>
            <input type="text" placeholder="请输入考勤名称">
        </div>
        <div class="choose-box">
            <p>考勤方式：</p>
            <ul class="attance-way">
                <li class="active" data-type="3">
                    <div class="iconarea nows">
                        <div class="icons"></div>
                    </div>
                    <span class="lable-title">二维码考勤</span>
                    <span style="margin: 5px 20px 0; display: block; font-size: 12px; color: #aaaaaa">只能通过现场二维码扫码进行考勤</span>
                </li>
                <li data-type="1">
                    <div class="iconarea digit">
                        <div class="icons"></div>
                    </div>
                    <span class="lable-title">数字考勤</span>
                    <span style="margin: 5px 20px 0; display: block; font-size: 12px; color: #aaaaaa">学生通过数字码签到，自动生成考勤状态</span>
                </li>
                <li data-type="2">
                    <div class="iconarea gps">
                        <div class="icons"></div>
                    </div>
                    <span class="lable-title">GPS考勤</span>
                    <span style="margin: 5px 20px 0; display: block; font-size: 12px; color: #aaaaaa">学生直接进行签到，系统会记录学生的GPS位置</span>
                </li>
                <li data-type="0">
                    <div class="iconarea tradition">
                        <div class="icons"></div>
                    </div>
                    <span class="lable-title">传统考勤</span>
                    <span style="margin: 5px 20px 0; display: block; font-size: 12px; color: #aaaaaa">默认全部出勤，老师可手动更改学生考勤状态</span>
                </li>
            </ul>
        </div>
    </div>
    <div class="btns">
        <a href="javascript:;" class="cancel">取消</a>
        <a href="javascript:;" class="sure">开始考勤</a>
    </div>
</div>

<!--新建数字考勤-->
<div class="del-pop" id="number-attend" data-type="1">
    <div class="pop-title">
        <h3>数字考勤</h3>
        <a href="javascript:;" class="close"></a>
    </div>
    <div class="content">
        <div class="number-box">
            <span></span>
            <span></span>
            <span></span>
            <span></span>
        </div>
        <div class="opt clearfix">
            <span class="fl">学生通过以上数字完成签到</span>
            <a href="javascript:;" class="fr change-one">更换一个</a>

        </div>
        <div class="sign-count">
            <span>已签到：</span>
            <i class="ing">23</i>
            <i class="line">/</i>
            <i class="total">50</i>
        </div>
    </div>
    <div class="btns">
        <a href="javascript:;" class="cancel">放弃</a>
        <a href="javascript:;" class="sure active">结束</a>
    </div>
</div>
<!--放弃弹窗-->
<div class="little-pop" id="abandon-attend">
    <h3 class="title">放弃此次考勤？</h3>
    <p class="re-words">放弃此考勤后，此次考勤数据将清零</p>
    <div class="btns">
        <a href="javascript:;" class="cancel">取消</a>
        <a href="javascript:;" class="sure active">放弃</a>
    </div>
</div>


<!--结束弹窗-->
<div class="little-pop" id="end-attend">
    <h3 class="title">结束并完成考勤？</h3>
    <p class="re-words">考勤结束后，老师可手动修改未签到学生考勤状态</p>
    <div class="btns">
        <a href="javascript:;" class="cancel">取消</a>
        <a href="javascript:;" class="sure active">结束</a>
    </div>
</div>
<!-- JS
============================================ -->

<script src="../../../static/test/attencev3/echarts.min.js"></script>
<script src="../../../static/js/vendor/jquery-1.12.4.min.js"></script>
<script src="../../../static/test/ziy/js/layer.js"></script>
<!-- Modernizer JS -->
<script src="../../../static/js/vendor/modernizr-2.8.3.min.js"></script>
<!-- Popper JS -->
<script src="../../../static/js/vendor/popper.min.js"></script>
<!-- Bootstrap JS -->
<script src="../../../static/js/vendor/bootstrap.min.js"></script>

<!-- Slick Slider JS -->
<script src="../../../static/js/plugins/slick.min.js"></script>
<!-- Countdown JS -->
<script src="../../../static/js/plugins/countdown.js"></script>
<!-- Barrating JS -->
<script src="../../../static/js/plugins/jquery.barrating.min.js"></script>
<!-- Counterup JS -->
<script src="../../../static/js/plugins/jquery.counterup.js"></script>
<!-- Nice Select JS -->
<script src="../../../static/js/plugins/jquery.nice-select.js"></script>
<!-- Sticky Sidebar JS -->
<script src="../../../static/js/plugins/jquery.sticky-sidebar.js"></script>
<!-- jQuery UI -->
<script src="../../../static/js/plugins/jquery-ui.min.js"></script>
<!-- jQuery UI Touch Punch -->
<script src="../../../static/js/plugins/jquery.ui.touch-punch.min.js"></script>
<!-- Venobox JS -->
<script src="../../../static/js/plugins/venobox.min.js"></script>
<!-- Scroll Top JS -->
<script src="../../../static/js/plugins/scroll-top.js"></script>
<!-- Theia Sticky Sidebar JS -->
<script src="../../../static/js/plugins/theia-sticky-sidebar.min.js"></script>
<!-- Waypoints JS -->
<script src="../../../static/js/plugins/waypoints.min.js"></script>
<!-- ElevateZoom JS -->
<script src="../../../static/js/plugins/jquery.elevateZoom-3.0.8.min.js"></script>
<!-- Images loaded JS -->
<script src="../../../static/js/plugins/imagesloaded.pkgd.min.js"></script>
<!-- Isotope JS -->
<script src="../../../static/js/plugins/isotope.pkgd.min.js"></script>
<!-- Ajax Mail JS -->
<script src="../../../static/js/ajax-mail.js"></script>

<!-- Vendor & Plugins JS (Please remove the comment from below vendor.min.js & plugins.min.js for better website load performance and remove js files from avobe) -->
<!--
<script src="../../../static/js/vendor/vendor.min.js"></script>
<script src="../../../static/js/plugins/plugins.min.js"></script>
-->

<!-- Main JS -->
<script src="../../../static/js/main.js"></script>
<script>
    //小三点 点击事件绑定
    $(document).on("click", ".attend_alrmore", function () {
        if ($(this).next().css("display") == "block") {
            $(this).next().css("display", "none");
            return
        }
        $(".attend_alrmore+ul").css("display", "none");
        $(this).next().css("display", "block");
        return false
    });
    $(document).bind("click", function () {
        $(".attend_alrmore+ul").css("display", "none")
    })
</script>

<script>
    //新建考勤 点击事件绑定
    $(document).on("click", ".btn-createattend", function () {
        layer.closeAll();
        layer.open({
            type: 1,
            title: false,
            closeBtn: false,
            area: ["780px", "512px"],
            success: function () {

                $("#new-perform input").focus().val("第一次考勤");
                $("#new-perform .sure").addClass("active")
            },
            content: $("#new-perform"),
            shift: 7,
            moveType: 1
        });
        $(".opt-box").hide();
        $(".perform-page .opt-a").css("border", "1px solid #ececec")
    });

    //考勤类型点击
    $(document).on("click", "#new-perform .attance-way li", function () {
        $(this).addClass("active").siblings().removeClass("active");
        var type = $(this).attr("data-type");
        $("#new-perform").attr("data-type", type)
    });

    //考勤弹框关闭按钮
    $(document).on("click", "#new-perform .cancel,#new-perform .close", function () {
        layer.closeAll()
    });

    //考勤弹框开始考勤按钮
    $(document).on("click", "#new-perform .sure", function () {
        //考勤标题
        var oV = $("#new-perform input").val();
        if ($("#new-perform").attr("data-type") == 0) {
                //传统考勤

        }else if ($("#new-perform").attr("data-type") == 1) {
                //数字考勤
            layer.closeAll();
            layer.open({
                type: 1,
                title: false,
                closeBtn: false,
                area: ["600px", "510px"],
                success: function () {
                    $("#number-attend .pop-title h3").html(oV);
                    API.attenceApi_getDigitAttence(id, function (data) {
                        $("#number-attend .ing").html(data.finishCount);
                        $("#number-attend .total").html(data.studentCount);
                        var code = data.data.code;
                        code = code.split("");
                        $("#number-attend .number-box span").each(function () {
                            var index = $(this).index();
                            $(this).html(code[index])
                        })
                    });
                    timer = setInterval(function () {
                        API.attenceApi_getAttenceState(id, function (data2) {
                            status = data2;
                            if (data2.data == null) {
                                clearInterval(timer);
                                bClick = true;
                                return
                            }
                            if (data2.data.over == 0) {
                                API.attenceApi_getDigitSignIn(id, function (data) {
                                    $("#number-attend .ing").html(data.signInCount);
                                    $("#number-attend .total").html(data.studentCount)
                                })
                            } else if (data2.data.over == 1) {
                                clearInterval(timer);
                                bClick = true;
                                return
                            }
                        })
                    }, 3e3);
                    bClick = true
                },
                content: $("#number-attend"),
                shift: 7,
                moveType: 1
            })
        }else if ($("#new-perform").attr("data-type") == 2) {
                //GPS考勤
        }else if ($("#new-perform").attr("data-type") == 3) {
                //二维码考勤
        }
    })

//数字考勤，放弃按钮和关闭按钮
    $(document).on("click", "#number-attend .cancel,#number-attend .close", function () {
        abandonLayer= layer.open({
            type: 1,
            title: false,
            closeBtn: false,
            area: ["400px", "196px"],
            content: $("#abandon-attend"),
            shift: 7,
            moveType: 1
        })
    })
    //数字考勤，放弃按钮和关闭按钮 的取消按钮
    $(document).on("click", "#abandon-attend .cancel", function () {
        layer.close(abandonLayer);
    });
    //数字考勤，放弃按钮和关闭按钮 的放弃按钮
    $(document).on("click", "#abandon-attend .sure", function () {

            layer.msg("考勤已放弃", 0);
            setTimeout(function () {
                location.reload()
            }, 600)


    });

    //数字考勤，结束按钮
    var endLayer = null;
    $(document).on("click", "#number-attend .sure", function () {
        layer.close(endLayer);
        endLayer = layer.open({
            type: 1,
            title: false,
            closeBtn: false,
            area: ["400px", "196px"],
            content: $("#end-attend"),
            shift: 7,
            moveType: 1
        })
    })
    //数字考勤，结束按钮 的取消按钮
    $(document).on("click", "#end-attend .cancel", function () {
        layer.close(endLayer)
    });
    //数字考勤，结束按钮 的结束按钮
    $(document).on("click", "#end-attend .sure", function () {
        alert("结束！！！！");
        layer.closeAll()
    })

</script>


<script type="text/javascript">
    //第index个考勤 可以用for循环进行一一赋值。
   var index=0;
    //修改attendrate 考勤率
    var attendrate = 30;
    var color =new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
        offset: 1,
        color: "#fed100"
    }, {offset: .5, color: "#ffc107"}, {
        offset: 0,
        color: "#ffc107"
    }]);
    echarts.init($(".attend_circle")[index]).setOption({
        title: {
            text: attendrate + "%",
            x: "center",
            y: "center",
            textStyle: {color: "#abacb4", fontSize: 14}
        },
        color: [color, "#e6e6e6"],
        series: [{
            type: "pie",
            hoverAnimation: false,
            radius: ["75%", "100%"],
            data: [{value: attendrate}, {value: 100 - attendrate}],
            itemStyle: {normal: {label: {show: false}, labelLine: {show: false}}}
        }]
    })
    index=1;
    attendrate=60;
    echarts.init($(".attend_circle")[index]).setOption({
        title: {
            text: attendrate + "%",
            x: "center",
            y: "center",
            textStyle: {color: "#abacb4", fontSize: 14}
        },
        color: [color, "#e6e6e6"],
        series: [{
            type: "pie",
            hoverAnimation: false,
            radius: ["75%", "100%"],
            data: [{value: attendrate}, {value: 100 - attendrate}],
            itemStyle: {normal: {label: {show: false}, labelLine: {show: false}}}
        }]
    })
//重命名
    $(document).on("click", ".btn_altertitle_attend", function () {
        var _this = $(this);
        var _par = _this.parents(".attend_attendlist");
        var title = $.trim(_par.find(".attend_alname").html());
        layer.open({
            type: 1,
            skin: "layer-ext-ding00",
            title: "请输入考勤名称",
            area: ["450px"],
            content: '<input id="alterattencetitle" type = "text" value="' + title + '" placeholder="请输入考勤名称" style="width:90%;margin:0 20px;border:none;border-bottom:1px solid #328eeb;line-height:30px;"/>',
            btn: ["确定", "取消"],
            success: function (i) {
                $(i).find("input").on("input", function () {
                    var value = $.trim($(this).val());
                    if (value == "" || value == title) {
                        $(i).find(".layui-layer-btn0").removeClass("active")
                    } else {
                        $(i).find(".layui-layer-btn0").addClass("active")
                    }
                })
            },
            yes: function (i) {
                var attenceid = _par.data("id");
                var value = $.trim($("#alterattencetitle").val());

                      layer.msg("修改成功");

                layer.close(i)
            }
        })
    });
//考勤删除按钮
    $(document).on("click", ".btn_delete_attend", function () {
        var _this = $(this);
        var _par = _this.parents(".attend_attendlist");
        var id = _par.data("id");
        layer.confirm("", {
            btn: ["确认", "取消"],
            title: false,
            skin: "layer-ext-ding00",
            content: '<p style="font-size:18px;height:50px;padding:10px 0 20px 0;">确认删除此次考勤?</p>',
            closeBtn: 0,
            shift: 7,
            moveType: 1,
            area: ["400px"],
            success: function (dialog) {
                $(dialog).find(".layui-layer-btn0").addClass("active")
            }
        }, function (index) {
          layer.msg("删除成功");
        })
    });
</script>
</body>

</html>

